'''
Created on 08.04.2014

@author: Jan-Patrick
'''
def __init__(self):
    import objects, screen
    
    self.x = screen.Screen.x
    self.xsize = screen.Screen.xsize
    
    
def checkEvents(self):
    import pygame, objects, screen

    pressed = pygame.key.get_pressed()
    if pressed[pygame.K_LEFT] and (self.x > 0):
        objects.player1.move(-10)
    if pressed[pygame.K_RIGHT] and (self.x < self.xsize-50):
        objects.player1.move(10)

    if pressed[pygame.K_UP] and (objects.bullet1.bullet_obj == None):
        objects.Bullet.shotEvent(self)
